﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ImportDataFileter.Model
{
    public class ImportDataFileterEntitiy : DbContext
    {

        public ImportDataFileterEntitiy(int index)
           : base(GetConnectionString(index))
        {

        }

        private static string GetConnectionString(int index)
        {
            List<string> ConectionString = new List<string>();
            ConectionString.Add("data source=47.104.92.101;initial catalog=db_doctor;persist security info=True;user id=yyzx;password=DTIANXIANG445566;MultipleActiveResultSets=True");
            ConectionString.Add("data source=47.104.92.101;initial catalog=db_doctorgz;persist security info=True;user id=yyzx;password=DTIANXIANG445566;MultipleActiveResultSets=True");
            ConectionString.Add("data source=47.104.92.101;initial catalog=db_doctorcs;persist security info=True;user id=yyzx;password=DTIANXIANG445566;MultipleActiveResultSets=True");
            return ConectionString[index];
        }

        //机构表
        public DbSet<Base_Organization> Base_Organization { get; set; }
        //机构等级表
        public DbSet<tb_Level> tb_Level { get; set; }
        //用户表
        public DbSet<tb_User> tb_User { get; set; }
        //职称表
        public DbSet<tb_Title> tb_Title { get; set; }
        //项目表
        public DbSet<tb_Project> tb_Project { get; set; }
        //学分表
        public DbSet<tb_Credit> tb_Credit { get; set; }
        //学分类别表
        public DbSet<tb_CreaditCategory> tb_CreaditCategory { get; set; }
    }
}
